package model.commands.math;

import java.util.List;
import model.Environment;
import model.SyntaxErrorException;
import model.commands.Command;


/**
 * Name:
 * QUOTIENT value1 value2
 * / value1 value2
 * 
 * Description:
 * returns integer quotient of value1 and value2
 * 
 * @author JLongley
 * @author Erick Gonzalez
 */
public class QuotientCommand extends Command {

    @Override
    public int evaluate(Environment e) throws SyntaxErrorException {
        List<Command> myArguments = getArguments();
        return myArguments.get(0).evaluate(e) /
               myArguments.get(1).evaluate(e);
    }
}
